
namespace FrameworkDesign
{
    public interface IQuery<TResult> : IBelongToArchitecture, ICanSetArchitecture, ICanGetModel,ICanSendQuery,ICanGetSystem
    {
        TResult Do();
    }
    public abstract class AbstractQuery<T> : IQuery<T>
    {
        private IArchitecture mArchitecture;
        public T Do()
        {
            return OnDo();
        }
        public abstract T OnDo();

        IArchitecture IBelongToArchitecture.GetArchitecture()
        {
            return mArchitecture;
        }

        public void SetArchitecture(IArchitecture architecture)
        {
           mArchitecture = architecture;
        }
    }
}